Micron Document
🎖️GitЯра🎖️

Node / meshtastic / Meshtastic-Android / files / app / src / main / java / com / geeksville / mesh / ui / intro / LocationScreen.kt

Displaying Raw • Download

app/src/main/java/com/geeksville/mesh/ui/intro/LocationScreen.kt ui_message_list (be3f882f) Text, 3.60 KB

T8b949e/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

Tff7b72package T7ee787com.geeksville.mesh.ui.intro

Tff7b72import T7ee787android.content.Intent
Tff7b72import T7ee787android.net.Uri
Tff7b72import T7ee787android.provider.Settings
Tff7b72import T7ee787androidx.compose.material.icons.Icons
Tff7b72import T7ee787androidx.compose.material.icons.outlined.LocationOn
Tff7b72import T7ee787androidx.compose.material.icons.outlined.Router
Tff7b72import T7ee787androidx.compose.runtime.Composable
Tff7b72import T7ee787androidx.compose.runtime.remember
Tff7b72import T7ee787androidx.compose.ui.platform.LocalContext
Tff7b72import T7ee787com.geeksville.mesh.R

T8b949e/**
* Screen for configuring location permissions during the app introduction. It explains why location permissions are
* needed and provides options to grant them or skip.
*
* @param showNextButton Indicates whether to show a "Next" button (if permissions are already granted) or a "Configure"
* button.
* @param onSkip Callback invoked if the user chooses to skip location permission setup.
* @param onConfigure Callback invoked when the user proceeds to configure or grant permissions.
*/
Tf0883e@Composable
Tff7b72internal Tff7b72fun Td2a8ffLocationScreenTb4b4b4(Te6edf3showNextButtonTb4b4b4: Tffa657BooleanTb4b4b4, Te6edf3onSkipTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4, Te6edf3onConfigureTb4b4b4: Tb4b4b4(Tb4b4b4) Tff7b72-Tff7b72> Tffa657UnitTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3context Tff7b72= Te6edf3LocalContextTb4b4b4.Te6edf3current
Tff7b72val Te6edf3annotatedString Tff7b72=
Te6edf3contextTb4b4b4.Te6edf3createClickableAnnotatedStringTb4b4b4(
Te6edf3fullTextRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3phone_location_descriptionTb4b4b4,
Te6edf3linkTextRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3settingsTb4b4b4,
Te6edf3tag Tff7b72= Te6edf3SETTINGS_TAGTb4b4b4,
Tb4b4b4)

Tff7b72val Te6edf3features Tff7b72= Te6edf3remember Tb4b4b4{
Te6edf3listOfTb4b4b4(
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3IconsTb4b4b4.Te6edf3OutlinedTb4b4b4.Te6edf3LocationOnTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3share_locationTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3share_location_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3IconsTb4b4b4.Te6edf3OutlinedTb4b4b4.Te6edf3RouterTb4b4b4,
Te6edf3titleRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3distance_measurementsTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3distance_measurements_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3IconsTb4b4b4.Te6edf3OutlinedTb4b4b4.Te6edf3RouterTb4b4b4, T8b949e// Consider a different icon if appropriate
Te6edf3titleRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3distance_filtersTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3distance_filters_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Te6edf3FeatureUIDataTb4b4b4(
Te6edf3icon Tff7b72= Te6edf3IconsTb4b4b4.Te6edf3OutlinedTb4b4b4.Te6edf3LocationOnTb4b4b4, T8b949e// Consider a different icon if appropriate
Te6edf3titleRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3mesh_map_locationTb4b4b4,
Te6edf3subtitleRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3mesh_map_location_descriptionTb4b4b4,
Tb4b4b4)Tb4b4b4,
Tb4b4b4)
Tb4b4b4}

Te6edf3PermissionScreenLayoutTb4b4b4(
Te6edf3headlineRes Tff7b72= Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3phone_locationTb4b4b4,
Te6edf3annotatedDescription Tff7b72= Te6edf3annotatedStringTb4b4b4,
Te6edf3features Tff7b72= Te6edf3featuresTb4b4b4,
Te6edf3onSkip Tff7b72= Te6edf3onSkipTb4b4b4,
Te6edf3onConfigure Tff7b72= Te6edf3onConfigureTb4b4b4,
Te6edf3configureButtonTextRes Tff7b72= Tff7b72if Tb4b4b4(Te6edf3showNextButtonTb4b4b4) Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3next Tff7b72else Te6edf3RTb4b4b4.Te6edf3stringTb4b4b4.Te6edf3configure_location_permissionsTb4b4b4,
Te6edf3onAnnotationClick Tff7b72= Tb4b4b4{
Tff7b72val Te6edf3intent Tff7b72= Te6edf3IntentTb4b4b4(Te6edf3SettingsTb4b4b4.Te6edf3ACTION_APPLICATION_DETAILS_SETTINGSTb4b4b4)
Te6edf3intentTb4b4b4.Te6edf3data Tff7b72= Te6edf3UriTb4b4b4.Te6edf3fromPartsTb4b4b4(Ta5d6ff"Ta5d6ffpackageTa5d6ff"Tb4b4b4, Te6edf3contextTb4b4b4.Te6edf3packageNameTb4b4b4, Tff7b72nullTb4b4b4)
Te6edf3contextTb4b4b4.Te6edf3startActivityTb4b4b4(Te6edf3intentTb4b4b4)
Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}

Served by rngit 1.5.1 - Generated in 0.05s